package ar.com.freesales.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name = "HOTEL_OTA")
public class HotelOta implements Serializable{
	
	private Long id;
	private Hotel hotel;
	private Ota ota;
	private String user;
	private String pass;
	private Set<RoomTypeCode> codigosHabitaciones;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	public Long getId() {
		return id;
	}
	
	@ManyToOne
    @JoinColumn(name = "ID_HOTEL")
	public Hotel getHotel() {
		return hotel;
	}
	
	@ManyToOne
    @JoinColumn(name = "ID_OTA")
	public Ota getOta() {
		return ota;
	}
	
	@OneToMany(mappedBy = "idHotelOta")
	public Set<RoomTypeCode> getCodigosHabitaciones() {
		return codigosHabitaciones;
	}
	
	@Column (name = "PASS")
	public String getPass() {
		return pass;
	}
	
	@Column (name = "USER")
	public String getUser() {
		return user;
	}
	
	
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public void setHotel(Hotel hotel) {
		this.hotel = hotel;
	}
	
	public void setOta(Ota ota) {
		this.ota = ota;
	}
	
	public void setUser(String user) {
		this.user = user;
	}
	
	public void setPass(String pass) {
		this.pass = pass;
	}
	
	public void setCodigosHabitaciones(Set<RoomTypeCode> codigosHabitaciones) {
		this.codigosHabitaciones = codigosHabitaciones;
	}
	
}
